import {Watcher} from "./Watcher.js";
export class Dep {
    private watchers:Watcher[] = []
    static target:Watcher|null = null



    pushDep(watcher:Watcher){
        this.watchers.push(watcher)
    }

    notify(){
        this.watchers.forEach(sub=>{
            sub.update()
        })
    }

}